<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ifelse</title>

</head>
<body>

<!--view层，模板-->
<div id="app">
    <div v-if="type==='A'">A</div>
    <div v-else-if="type==='B'">B</div>
    <div v-else>C</div>
</div>

<!--1.导入Vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>

<script type="text/javascript">
    var vm = new Vue({
        el:"#app",
        /*Model：数据*/
        data: {
            type: ''
        }
    });
</script>
</body>
</html>